import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;


public class Test2 {

	public static void main(String[] args) {
		
	}
	
	public void xmlParsing(){
		File xmlfile= new File("C:\\myfile.xml");
		BufferedWriter writer = null;
		try {
		    writer = new BufferedWriter(new FileWriter(xmlfile));  
		}
		catch (IOException e) {
		    e.printStackTrace();
		} 
		
		String xmlcode=null;
		 
		 
		//this is the bit where you write your XML to the file
		try {
		    writer.write(xmlcode);
		}
		catch(IOException e) {
		    e.printStackTrace();
		}
		 
		//close the file (this is important)
		try {
		    writer.close();
		}
		catch(IOException e) {
		    e.printStackTrace();
		}
	}
}
